<?php

error_reporting(E_ALL);

/**
 * AplicacionWeb - class.DetalleSalida.php
 *
 * $Id$
 *
 * This file is part of AplicacionWeb.
 *
 * Automatically generated on 01.12.2011, 13:42:41 with ArgoUML PHP module 
 * (last revised $Date: 2010-01-12 20:14:42 +0100 (Tue, 12 Jan 2010) $)
 *
 * @author firstname and lastname of author, <author@example.org>
 */

if (0 > version_compare(PHP_VERSION, '5')) {
    die('This file was generated for PHP 5');
}

/**
 * include ModeloArticulos
 *
 * @author firstname and lastname of author, <author@example.org>
 */
require_once('class.ModeloArticulos.php');

/**
 * include ModeloSalidaDetalle
 *
 * @author firstname and lastname of author, <author@example.org>
 */
require_once('class.ModeloSalidaDetalle.php');

/* user defined includes */
// section 10-25-3-74-25c3b17:133af115f13:-8000:00000000000021E3-includes begin
// section 10-25-3-74-25c3b17:133af115f13:-8000:00000000000021E3-includes end

/* user defined constants */
// section 10-25-3-74-25c3b17:133af115f13:-8000:00000000000021E3-constants begin
// section 10-25-3-74-25c3b17:133af115f13:-8000:00000000000021E3-constants end

/**
 * Short description of class DetalleSalida
 *
 * @access public
 * @author firstname and lastname of author, <author@example.org>
 */
class DetalleSalida
{
    // --- ASSOCIATIONS ---


    // --- ATTRIBUTES ---

    /**
     * Short description of attribute modSalidaDet : ModeloSalidaDetalle
     *
     * @access public
     */
    public $modSalidaDet = null;

    /**
     * Short description of attribute modArticulos : ModeloArticulos
     *
     * @access public
     */
    public $modArticulos = null;

    /**
     * Short description of attribute row : Array
     *
     * @access public
     */
    public $row = null;

    // --- OPERATIONS ---

    /**
     * Short description of method DetalleSalida
     *
     * @access public
     * @author firstname and lastname of author, <author@example.org>
     * @param  cveart
     * @param  cant
     * @return mixed
     */
    public function DetalleSalida($cveart, $cant)
    {
        // section 10-25-3-74-25c3b17:133af115f13:-8000:00000000000021ED begin
		$this->modArticulos = new ModeloArticulos();
		$this->row = $this->modArticulos->getRowByCve($cveart);
		//$this->row["cveart"] = row[0]["ArticuloClave"];
		$this->row["existencia"] = $this->row[0]["ArticuloExistencia"];
		$this->row["cantidad"] = $cant;
        // section 10-25-3-74-25c3b17:133af115f13:-8000:00000000000021ED end
    }

    /**
     * Short description of method Salvar
     *
     * @access public
     * @author firstname and lastname of author, <author@example.org>
     * @param  folio
     * @param  last
     * @return mixed
     */
    public function Salvar($folio, $last)
    {
        // section 10-25-3-74-25c3b17:133af115f13:-8000:00000000000021F1 begin
        $this->modSalidaDet = new ModeloSalidaDetalle();
		$this->row["folio"]=$folio;
		$this->row["ultimo"]=$last;
        $this->modSalidaDet->insertRow($this->row);
        // section 10-25-3-74-25c3b17:133af115f13:-8000:00000000000021F1 end
    }

} /* end of class DetalleSalida */

?>